using power rule with square root to take derivative